<%@page import="chase.myrewards.*"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!DOCTYPE html>
<html>
    <head>
        <title>Your Account Information</title>
        <link rel=stylesheet href="./myrewards.css" type="text/css">
    </head>
    <body>
        <jsp:useBean id="recentlyaccrued" type="chase.myrewards.beans.RecentlyAccruedBean" scope="session" />
        <table>
            <tr>
                <th>Your Rewards Programs</th>
                <th>Your Total Purchases</th>
            </tr>
            <% for (int i = 0; i < recentlyaccrued.getSize(); i++){ %>
            <tr>
                <td><%=recentlyaccrued.getPrograms().get(i)%></td>
                <td><%=recentlyaccrued.getTotalPurchases().get(i)%></td>
            </tr>
            <% } %>
            <tr>
                <th>Your Current Rewards Points Balance</th>
                <td><jsp:getProperty name="recentlyaccrued" property="currentBalance" /></td>
            </tr>
        </table>
    </body>
</html>